#makefile
#执行前注意添加export LD_LIBRARY_PATH=.

test: test.o libsrc.so
	g++ -o test -L./ -lsrc test.o

libsrc.so: source1.o source2.o
	g++ -o libsrc.so -shared source1.o source2.o 

test.o: test.cpp
	g++ -c test.cpp

source1.o: source1.cpp
	g++ -c source1.cpp

source2.o: source2.cpp
	g++ -c source2.cpp

clean: 
	rm -fr test *.o *.so
